package com.example.users.controller;


import com.example.users.pojo.TbUser;
import com.example.users.service.impl.TbUserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 梁峰
 * @since 2021-12-10
 */
@RestController
@RequestMapping("/users")
public class TbUserController {
    @Autowired
    private TbUserServiceImpl tbUserService;
    @RequestMapping("/{id}")
    public TbUser getById(@PathVariable("id") long id){
        TbUser byId = tbUserService.getById(id);
        return byId;

    }

}
